<template lang="pug">
    scroll-view(scroll-x class="bg-white nav")
        view(class="flex text-center solid-bottom")
          template
            slot(:activedId="activedId")
</template>
<script>
export default {
  name: "nav",

  data() {
    return {
      curId: this.activedId
    };
  },

  props: {
    activedId: { type: String } // 当前激活的选项
  },

  provide() {
    return {
      rootNav: this
    };
  },

  model: {
    prop: "activedId",

    event: "update"
  },

  methods: {
    changeActived(id) {
      this.$emit("update", id);
    }
  }
};
</script>
<style scoped lang="less">
</style>